import request from '@/utils/request'

// 查询用户公告列表
export function listUserNotice(query) {
  return request({
    url: '/system/userNotice/list',
    method: 'get',
    params: query
  })
}

// 查询用户公告详细
export function getUserNotice(id) {
  return request({
    url: '/system/userNotice/' + id,
    method: 'get'
  })
}

// 新增用户公告
export function addUserNotice(data) {
  return request({
    url: '/system/userNotice',
    method: 'post',
    data: data
  })
}

// 修改用户公告
export function updateUserNotice(data) {
  return request({
    url: '/system/userNotice',
    method: 'put',
    data: data
  })
}

export function confirmNotice(data) {
  return request({
    url: '/system/userNotice/confirmNotice/'+data,
    method: 'put'
  })
}
// 删除用户公告
export function delUserNotice(id) {
  return request({
    url: '/system/userNotice/' + id,
    method: 'delete'
  })
}

// 导出用户公告
export function exportUserNotice(query) {
  return request({
    url: '/system/userNotice/export',
    method: 'get',
    params: query
  })
}